<?php
// +----------------------------------------------------------------------
// | 杭州十禾信息科技有限公司
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2015 http://www.shelpe.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: LeePuman <ysyzlsm@163.com>
// +----------------------------------------------------------------------

/**
 * 直通车报表数据API
 */
class RptCustomerModel extends RptBaseModel
{
	protected $tableName = 'rpt_customer';
	//protected $tableName = 'rpt_customer';
	/** @var object */
	private $me = null;
	/** @var object */
	private $subwayToken = null;
	
	/**
	 * 初始化。主要检查session['me']。
	 *
	 */
	public function _initialize() {
		parent::_initialize();
		$this->me = session('me');
	}
	
	public function getAllCustomerStat( $indicators = '', $from = null, $to = null, $type='summary,series' , $force_uid=0)
	{
	    $uid = $force_uid ? $force_uid :$this->me['user_id'];
		return $this->getStats( $uid, $uid, $indicators, $from, $to, $type);
	}
}
